
<?php //echo $error;?>
    <?php echo form_open(base_url().'admin/admin_con/update_banner')?>
<div id="gallery">
    <?php
    $i=0;
        foreach($images as $img){
            $i++;
    ?>
    <div class="thumb">
        <a href=" <?php  echo $img['url']; ?> ">
        <img src=" <?php echo $img['thumb_url']; ?>" alt="" />
    </a>
        <input id="check" type='checkbox' name='image[]' <?php if($img['checked']) echo 'checked="yes"'?> id='pilihan' value='<?php echo $img['url'];?>'/> 
    </div>
    <?php
        }
    ?>
    
<script type="text/javascript">
$(function() {
    $('input[type="checkbox"]').change(function() {
        var countchecked = $('input[type="checkbox"]').filter(":checked").length

        if (countchecked >= 7) {
            $("input:checkbox").not(":checked").attr("disabled", true);
        }else{
            $("input:checkbox").attr("disabled", false);
        }
    });
});
</script>

 </div>
<div id="submit">
                <?php
                    echo form_submit('submit','Submit');?>
</div>
<?php echo form_close()?> 

